import { Button, Card, Modal } from 'antd';
import React, { useState } from 'react';
import styles from './index.less';

export default function Page() {
  const [loading, setLoading] = useState<boolean>(false);
  const finish = () => {
    Modal.success({
      content: '恭喜您完成一次发版，娜娜将在此等候你的归来',
    });
  };
  const handlePreviousStep = () => {
    window.postMessage({ step: 1 }, window.location.href);
  };
  return (
    <Card title="发布后" className={styles.card}>
      <Button onClick={handlePreviousStep}>上一步</Button>
      <Button type="primary" onClick={finish} loading={loading}>
        完成发版
      </Button>
    </Card>
  );
}
